Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the bytecode verification process by improving error handling, adding GitHub-based compilation, and updating configurations. The main purpose is to detect and report bytecode length mismatches without aborting the run, and to compile bytecode from GitHub sources using Etherscan compiler settings.
Changes:
- Improved bytecode comparison to detect and report length/opcode mismatches as errors rather than aborting
- Added functionality to compile bytecode from GitHub sources for bytecode comparison
- Enhanced error handling to treat bytecode comparison failures as reportable diffs
- Added stdin interactivity detection to skip prompts in CI/CD environments
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_binary_verifier.py | New test file covering length mismatch detection, immutable-only diffs, and non-immutable differences |
| diffyscan/utils/binary_verifier.py | Updated length mismatch handling to display diffs before raising errors, fixed checkpoint calculation for empty instruction lists, corrected opcode mismatch detection |
| diffyscan/diffyscan.py | Added _build_github_solc_input to fetch sources from GitHub for compilation, updated exception handling to catch bytecode errors gracefully, added stdin.isatty() check for CI compatibility |
| config_samples/ethereum/mainnet/gualGovernance/*.json | Added explorer_token_env_var and explorer_chain_id fields for Etherscan API v2 support |
| config_samples/ethereum/hoodi/vaults/hoodi_vaults_testnet_config.json | Fixed V3Template constructor arguments with 28-address array plus expiry and max ratio parameters |
| .github/workflows/regression.yml | Added Dual Governance mainnet config tests, included ETHERSCAN_TOKEN env var, added bytecode diff allowances for specific contracts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tamtamchik
reviewed
Feb 2, 2026
Member
tamtamchik
left a comment
There was a problem hiding this comment.
I'm not that sure about the allowed diffs in CI, will re-check and come back
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
poetry run pytest -qpoetry run diffyscan --hardhat-path hardhat_configs/hoodi_hardhat_config.ts -Y -E -G config_samples/ethereum/hoodi/vaults/hoodi_vaults_testnet_config.json [CI allowlist flags]poetry run diffyscan --hardhat-path hardhat_configs/mainnet_hardhat_config.ts -Y -E -G config_samples/ethereum/mainnet/gualGovernance/dual_governance_mainnet_config.json --allow-bytecode-diff 0xd6A67636c05BeB5B4a5c90D408b03A63c4e39426